home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 55
/
055.d81
/
roll off
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
13KB
|
404 lines
10 zz=zz+1:poke53272,21:print""
20 ifzz=1thenpoke53280,0:poke53281,0:goto2180
30 ifzz=2thenload"ro1",8,1
40 ifzz=3thenload"ro2",8,1
45 ifzz=4thenload"fanfare",8,1
50 gosub2340:forx=1to500:next
60 pokesp+21,0:gosub2140
70 print"[147][159] = ";
80 print"[146] = [146]"
90 print" [159] ";
100 print" = [146] = [146] ";
110 print" ";
120 print" [146] ";
130 print" ";
140 print" [159] [180] [180] [180] [180] [180]";
150 print" [180] [180] [180] [180] [159] ";
160 print" [180] [180] [180] [180] [180] [180] [180] [180] ";
170 print" [180] [159] [180]1 [180]2 [180]3";
180 print" [180]4 [180]5 [180]6 [180]7 [180]8 [180]9 [159] ";
190 print" [180] [180] [180] [180] [180] [180] ";
200 print"[180] [180] [180] [159] [180] ";
210 print"[180] [180] [180] [180] [180] [180] [180] [180] ";
220 print" [159] [180] [180] [180] [180] [180]";
230 print" [180] [180] [180] [180] ";
240 print" ";
250 print" ";
260 print" ";
270 print" ";
280 print" ";
290 print" ";
300 print" ";
310 print" ";
320 print" ";
330 print" ";
340 print" ";
350 print" ";
360 print" ";
370 print" ";
380 print" ";
390 print" ";
400 print" ";
410 print" ";
420 print" [146][144]"
430 poke1983,160:poke54272+1983,6
440 ed$=""
450 sb=1313:sc=54272:ty%=4:ln%=1
460 printed$"number of players [157][157][157] ";:gosub2850:np$=k$
470 ifk$>"0"andk$<"5"then510
480 printed$" choose a number from 1 to 4!"
490 fora=1to2000:next
500 printed$" ":goto460
510 gz$=" [157][157][157][157][157][157][157][157]"
520 np=val(np$)
530 gosub2620
540 pn=177:r1=45:r2=45:r3=45:r4=45:nn=1
550 gg$="[159]":printgg$;f$;"[146]" :gosub1760:gosub1960:goto630
560 nn=nn+1
570 ifnn=np+1thengoto2430
580 pn=pn+1
590 printgg$;" [146]"
600 ifnn=2thenprintgg$;gz$;s$
610 ifnn=3thenprintgg$;gz$;t$
620 ifnn=4thenprintgg$;gz$;l$
630 cp=0:iff$="wiz kid"andnn=1thencp=1
640 ifs$="wonder boy"andnn=2thencp=1
650 ift$="sassy sue"andnn=3thencp=1
660 ifl$="micro chip"andnn=4thencp=1
670 ifl$="micro chip"andnn=4thencp=1
680 ifcp=1thenprint"[159]rolling":goto700
690 print"[159]roll dice"
700 ifcp<>1thenprint"(press r)[146]":goto720
710 print" dice [146]"
720 gosub750
730 print"[159] [146]":print"[159] [146]"
740 goto1010
750 ifcp=1then780
760 geta$:ifa$=""then760
770 ifa$<>"r"then760
780 rem
790 sp=53248
800 poke2042,248:poke2043,249:pokesp+41,1:pokesp+42,1:pokesp+28,15
810 poke2040,248:poke2041,249:pokesp+21,1:pokesp+39,1:pokesp+40,1
820 s1=5:x=255:sys(29965+155)
830 x=x-20:pokesp+21,s1
840 pokesp,x:pokesp+1,172
850 pokesp+2,x:pokesp+3,172
860 pokesp+4,x:pokesp+5,200
870 pokesp+6,x:pokesp+7,200
880 s1=s1+5
890 ifs1=15thens1=5
900 ifx>30then830
910 s1=5:x=30
920 x=x+5:pokesp+21,s1
930 pokesp,x:pokesp+1,172
940 pokesp+2,x:pokesp+3,172
950 pokesp+4,x:pokesp+5,200
960 pokesp+6,x:pokesp+7,200
970 s1=s1+5
980 ifs1=15thens1=5
990 ifx>100thenpoke(29965+1079),4:return
1000 goto920
1010 d1=int(6*rnd(0)+1)
1020 d2=int(6*rnd(0)+1)
1030 td=d1+249:bd=d2+249
1040 poke2040,td:poke2041,bd
1050 pokesp+21,3:pokesp,105:pokesp+1,172
1060 pokesp+2,105:pokesp+3,200
1070 b$="":bn=0:bb=0:d3=d1+d2
1080 dd=d3:printb$;"dice total";dd:ifcp=1then1110
1090 print"type number(s)[146]"
1100 print"e=erase d=done[146]"
1110 ifcp=1andbb=1thenbb=0:d3=dd
1120 ifcp=1then3080
1130 getn$:ifn$=""then1110
1140 ifn$="d"then1520
1150 if(n$>"9")or(n$<"1")then1130
1160 n=val(n$):ifz(n)=0thengosub2060:goto1110
1170 ifn>d3thengosub1980:goto1110
1180 z(n)=0
1190 ifn=d3thend3=d3-n:goto1910
1200 d3=d3-n:ifcp<>1thenprintb$"";n;"[146]"
1210 ifcp=1andbb=1then1110
1220 ifcp=1then1240
1230 getn1$:ifn1$=""then1210
1240 ifn1$="d"then1520
1250 ifn1$="e"thenz(n)=n:gosub1750:printb$" ":goto1110
1260 n1=val(n1$):ifz(n1)=0thengosub2070:goto1210
1270 ifn1>d3thengosub1990:goto1210
1280 z(n1)=0
1290 ifn1=d3thend3=d3-n1:goto1910
1300 d3=d3-n1:ifcp<>1thenprintb$"";n1;"[146]"
1310 ifcp=1andbb=1then1110
1320 ifcp=1then1340
1330 getn2$:ifn2$=""then1310
1340 ifn2$="d"then1520
1350 ifn2$="e"thenz(n)=n:z(n1)=n1:gosub1750:printb$" ":goto1110
1360 n2=val(n2$):ifz(n2)=0thengosub2080:goto1310
1370 ifn2>d3thengosub2000:goto1310
1380 z(n2)=0
1390 ifn2=d3thend3=d3-n2:goto1910
1400 d3=d3-n2:ifcp<>1thenprintb$"";n2;"[146]"
1410 ifcp=1andbb=1then1110
1420 ifcp=1then1440
1430 getn3$:ifn3$=""then1410
1440 ifn3$="d"then1520
1450 ifn3$="e"thenz(n)=n:z(n1)=n1:z(n2)=n2:gosub1750:printb$" ":goto1110
1460 n3=val(n3$):ifz(n3)=0thengosub2090:goto1410
1470 ifn3>d3thengosub2010:goto1410
1480 ifn3<>d3thenbb=1:goto1410
1490 z(n3)=0
1500 ifn3=d3thend3=d3-n3:goto1910
1510 printb$" "
1520 r1$="[159]"
1530 r2$="[159]"
1540 ifnn=1thenprintr1$" [157][157][157]";r1;"[146]"
1550 ifnn=2thenprintr2$" [157][157][157]";r2;"[146]"
1560 ifnn=3thenprintr1$;" [157][157][157]";r3;"[146]"
1570 ifnn=4thenprintr2$;" [157][157][157]";r4;"[146]"
1580 ifcp=1thenforx=1to1000:next
1590 printb$;" "
1600 printb$;"[157] "
1610 print" [146]"
1620 ifn<>0thenv=n:gosub3010
1630 ifn1<>0thenv=n1:gosub3010
1640 ifn2<>0thenv=n2:gosub3010
1650 ifn3<>0thenv=n3:gosub3010
1660 ifcp=1thenforx=1to1000:next
1670 printb$;" "
1680 ifz(1)+z(2)+z(3)+z(4)+z(5)+z(6)+z(7)+z(8)+z(9)=0thenn$="d":pl=1
1690 ifpl=1thenprint""tab(20)"pure luck !":pl=0:forx=1to2000:next
1700 ifn$="d"then1830
1710 ifn1$="d"then1830
1720 ifn2$="d"then1830
1730 ifn3$="d"then1830
1740 n=0:n1=0:n2=0:n3=0:n$="":n1$="":n2$="":n3$="":goto630
1750 n=0:n1=0:n2=0:n3=0:n$="":n1$="":n2$="":n3$="":d3=dd:return
1760 r1$="[159]"
1770 r2$="[159]"
1780 ifnp>0thenprintr1$;r1;"[146]"
1790 ifnp>1thenprintr2$;r2;"[146]"
1800 ifnp>2thenprintr1$;"";r3;"[146]"
1810 ifnp>3thenprintr2$;"";r4;"[146]"
1820 return
1830 print"[165] [165] [165] [165] [165] [165] [165] [165] [165] [146]"
1840 print"[165] [165] [165] [165] [165] [165] [165] [165] [165] [146]"
1850 print"[165]1 [165]2 [165]3 [165]4 [165]5 [165]6 [165]7 [165]8 [165]9 [146]"
1860 print"[165] [165] [165] [165] [165] [165] [165] [165] [165] [146]"
1870 print"[165] [165] [165] [165] [165] [165] [165] [165] [165] [146]"
1880 print"[165] [165] [165] [165] [165] [165] [165] [165] [165] [146]"
1890 n=0:n1=0:n2=0:n3=0:n$="":n1$="":n2$="":n3$="":gosub1960
1900 goto560
1910 ifnn=1thenr1=r1-n:r1=r1-n1:r1=r1-n2:r1=r1-n3
1920 ifnn=2thenr2=r2-n:r2=r2-n1:r2=r2-n2:r2=r2-n3
1930 ifnn=3thenr3=r3-n:r3=r3-n1:r3=r3-n2:r3=r3-n3
1940 ifnn=4thenr4=r4-n:r4=r4-n1:r4=r4-n2:r4=r4-n3
1950 goto1510
1960 forzz=1to9:z(zz)=zz:next
1970 return
1980 ifcp=1thenprintb$;"[157][157][157][145] thinking ":goto2030
1990 ifcp=1thenprintb$;"[157][157][157][145] thinking ":z(n)=n:goto2030
2000 ifcp=1thenprintb$;"[157][157][157][145] thinking ":z(n)=n:z(n1)=n1:goto2030
2010 ifcp=1thenprintb$;"[157][157][157][145] thinking ":z(n)=n:z(n1)=n1:z(n2)=n2:goto2030
2020 printb$;"[157][157][157][145]number too high"
2030 forx=1to1000:next:bb=1
2040 printb$;"[157][157][157][145]